QT += core network gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

DEFINES += YREVIEW_LIBRARY
TEMPLATE        = lib

SOURCES += \
        yreviewplugin.cpp \
        yreviewdialog.cpp \
        et/etmainwindow.cpp \
    yreviewerdialog.cpp


HEADERS += \
        yreviewplugin.h \
        yreview_global.h \
        yreviewconstants.h \
        yreviewdialog.h \
        et/etmainwindow.h \
    yreviewerdialog.h


#增加wps控件的支持
#==============================================================================
WPS_OFFICE6 = /data/opt/kingsoft/wps-office/office6
#/data/opt/kingsoft/wps-office/office6
INCLUDEPATH += \
                ./include/common \
                ./include/wps \
                ./include/wpp \
                ./include/et


QMAKE_CXXFLAGS += -std=c++0x -Wno-attributes

exists($$WPS_OFFICE6/libstdc++.so.6){
        system(ln -s $$WPS_OFFICE6/libstdc++.so.6  libstdc++.so.6)
        LIBS += libstdc++.so.6
}

QMAKE_LFLAGS += -Wl,--rpath=\'\$\$ORIGIN\':$$[QT_INSTALL_LIBS]:$$WPS_OFFICE6
QMAKE_LIBDIR +=  ./ $$[QT_INSTALL_LIBS]  $$WPS_OFFICE6


greaterThan(QT_MAJOR_VERSION, 4){
        LIBS += -lrpcwpsapi_sysqt5 -lrpcetapi_sysqt5 -lrpcwppapi_sysqt5
        exists($$WPS_OFFICE6/libc++abi.so.1){
             QMAKE_LFLAGS += -Wl,-soname=libc++abi.so.1
        }
}
else{
        LIBS += -lrpcwpsapi -lrpcetapi -lrpcwppapi
}
#=================================================================================

# Qt Creator linking

## Either set the IDE_SOURCE_TREE when running qmake,
IDE_SOURCE_TREE = /home/chz/Documents/git_code/qt-creator

## Either set the IDE_BUILD_TREE when running qmake,
IDE_BUILD_TREE = /home/chz/Qt5.11.3/Tools/QtCreator

## uncomment to build plugin into user config directory
## <localappdata>/plugins/<ideversion>
##    where <localappdata> is e.g.
##    "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later
##    "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux
##    "~/Library/Application Support/QtProject/Qt Creator" on OS X
USE_USER_DESTDIR = yes

###### If the plugin can be depended upon by other plugins, this code needs to be outsourced to
###### <dirname>_dependencies.pri, where <dirname> is the name of the directory containing the
###### plugin's sources.

QTC_PLUGIN_NAME = yreview
QTC_LIB_DEPENDS += \
    # nothing here at this time

QTC_PLUGIN_DEPENDS += \
    coreplugin debugger projectexplorer

QTC_PLUGIN_RECOMMENDS += \
    # optional plugin dependencies. nothing here at this time

###### End _dependencies.pri contents ######

include($$IDE_SOURCE_TREE/src/qtcreatorplugin.pri)

FORMS += \
    yreviewdialog.ui \
    yreviewerdialog.ui
